package com.pal.api.controller;

import com.pal.api.service.TaskService;
import com.pal.api.service.TestService;
import com.pal.common.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author：LSM
 * @Date：2022/07/18/16:30
 */
@RestController
@RequestMapping("/api/hello/")
@Api(tags = "测试接口")
public class HelloController {
    @Resource
    private TaskService taskService;

    @Resource
    private TestService testService;

    @ApiOperation(value = "当前时间")
    @GetMapping("ctime.do")
    public R ctime(){
        return taskService.ctime();
    }

    @ApiOperation(value = "幸运数字")
    @GetMapping("luck.do")
    public R luck(){
        return testService.luck();
    }

}
